import * as lib from "./lib/index";
import callCloudBase from './callcloud'


const cloudConfig = {
  envid: 'one-e1dd7a',
  appid: "wxb8a458b7b60cac43",
  scope: 'xxx',
  appsecret: 'ba614921232a6cc14a31e96ab0d9a59c'
}

wx.cloud.init({ 
  env: cloudConfig.envid,
  traceUser: true 
})

const cloudbase = wx.cloud
const app = wx.cloud
const auth = {}
const db = app.database();
const callCloud = callCloudBase(app, lib)

module.exports = {
  app,
  auth,
  cloudbase,
  db,
  cloudConfig,
  lib,
  callCloud
}